package com.poly.flowable.factory;

import com.poly.common.core.domain.R;
import com.poly.flowable.RemoteDeployFormService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;


/**
 * 流程服务降级处理
 * 
 * @author Yang huijing
 */
@Component
public class RemoteDeployFormFallbackFactory implements FallbackFactory<RemoteDeployFormService>
{
    private static final Logger log = LoggerFactory.getLogger(RemoteDeployFormFallbackFactory.class);

    @Override
    public RemoteDeployFormService create(Throwable throwable)
    {
        log.error("流程服务调用失败:{}", throwable.getMessage());
        return new RemoteDeployFormService()
        {
        };
    }
}
